from selenium import webdriver
from selenium.webdriver.common.by import By

driver = webdriver.Chrome()
driver.get('https://www.baidu.com')
#查找一个标签
input = driver.find_element(By.TAG_NAME, 'input')
print(input)
print(input.get_attribute('outerHTML'))
#查找所有标签
inputs = driver.find_elements(By.TAG_NAME, 'input')
print(inputs)
print(len(inputs))
for ele in inputs:
    print(ele.get_attribute('outerHTML'))
driver.quit()

